<ion-view title="保单详情">
    <ion-content class="policy-detail" ng-class="{'has-header':TITLEBAR}">
        <div class="button-group button-bar button-tab">
            <a class="button" ng-class="{'button-active':policyDetail.changeState=='0'}" ng-click="policyDetail.changeStatus('0')">保单基本信息</a>
            <a class="button" ng-class="{'button-active':policyDetail.changeState=='1'}" ng-click="policyDetail.changeStatus('1')">账户信息</a>
            <a class="button" ng-class="{'button-active':policyDetail.changeState=='2'}" ng-click="policyDetail.changeStatus('2')">服务人员</a>
        </div>
        <div ng-if="policyDetail.changeState=='0'">
            <ul class="list common-list combine">
                <li class="item">
                    <div class="row">
                        <span class="label blue">保单明细</span>
                    </div>
                    <div class="inf-line">
                        <span class="label">保单号</span>
                        <span class="text"> myPolicyDetail.policyDetail.policyNo </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">投保单号</span>
                        <span class="text"> myPolicyDetail.policyDetail.holderPolicyNo </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">红利领取方式</span>
                        <span class="text"> myPolicyDetail.benefitAccount.bonusReceiveType|benefitaccountFilter </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">保费逾期未付选择</span>
                        <span class="text"> myPolicyDetail.policyDetail.outstandPolicy </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">续期交费账号</span>
                        <span class="text"> myPolicyDetail.policyDetail.bankAcc </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">账户名</span>
                        <span class="text"> myPolicyDetail.policyDetail.bankAccName </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">银行名称</span>
                        <span class="text"> myPolicyDetail.policyDetail.bankName </span>
                    </div>
                </li>
                <li class="item">
                    <div class="row">
                        <span class="label blue">交易明细</span>
                    </div>
                    <div class="inf-line">
                        <span class="label">订单号</span>
                        <span class="text"><a class="blue" ui-sref="my-order-detail({orderCode:myPolicyDetail.payRecordDetail.orderCode})"> myPolicyDetail.payRecordDetail.orderCode </a></span>
                    </div>
                    <div class="inf-line">
                        <span class="label">交易渠道</span>
                        <span class="text"> myPolicyDetail.payRecordDetail.payChannel|channalFilter </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">创建时间</span>
                        <span class="text"> myPolicyDetail.payRecordDetail.requestTime </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">付款时间</span>
                        <span class="text"> myPolicyDetail.payRecordDetail.responseTime </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">交易金额</span>
                        <span class="text"> myPolicyDetail.payRecordDetail.payAmount| currency:'￥' </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">产品详情</span>
                        <span class="text"><a class="blue" ui-sref="product-detail({id:myPolicyDetail.payRecordDetail.prdId})">点击查看</a></span>
                    </div>
                </li>
                <li class="item">
                    <div class="row">
                        <span class="label blue">投保人信息</span>
                    </div>
                    <div class="inf-line">
                        <span class="label">姓名</span>
                        <span class="text"> myPolicyDetail.custmerInfo.holderName </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">性别</span>
                        <span class="text"> myPolicyDetail.custmerInfo.holderGender </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">证件号码</span>
                        <span class="text"> myPolicyDetail.custmerInfo.holderIdType   myPolicyDetail.custmerInfo.holderIdNum | idFilter </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">出生日期</span>
                        <span class="text"> myPolicyDetail.custmerInfo.holderBirthday </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">联系电话</span>
                        <span class="text"> myPolicyDetail.custmerInfo.holderPhone | phoneFilter </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">手机号码</span>
                        <span class="text"> myPolicyDetail.custmerInfo.holderMobile | phoneFilter </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">联系地址</span>
                        <span class="text"> myPolicyDetail.custmerInfo.holderAddress </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">邮编</span>
                        <span class="text"> myPolicyDetail.custmerInfo.holderZipCode </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">邮件地址</span>
                        <span class="text"> myPolicyDetail.custmerInfo.holderEmail </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">单位地址</span>
                        <span class="text"> myPolicyDetail.custmerInfo.holderComAddress </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">单位电话</span>
                        <span class="text"> myPolicyDetail.custmerInfo.holderComTel </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">单位邮编</span>
                        <span class="text"> myPolicyDetail.custmerInfo.holderComZipCode </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">家庭地址</span>
                        <span class="text"> myPolicyDetail.custmerInfo.holderHomeAddress </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">家庭电话</span>
                        <span class="text"> myPolicyDetail.custmerInfo.holderHomeTel | phoneFilter </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">家庭邮编</span>
                        <span class="text"> myPolicyDetail.custmerInfo.holderHomeZipCode </span>
                    </div>
                </li>
                <li class="item">
                    <div class="row">
                        <span class="label blue">被保险人信息</span>
                    </div>
                    <div class="inf-line">
                        <span class="label">与投保人关系</span>
                        <span class="text"> myPolicyDetail.policyDetail.hiRelations </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">姓名</span>
                        <span class="text"> myPolicyDetail.custmerInfo.insuredName </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">性别</span>
                        <span class="text"> myPolicyDetail.custmerInfo.insuredGender </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">证件号码</span>
                        <span class="text"> myPolicyDetail.custmerInfo.insuredIdType  myPolicyDetail.custmerInfo.insuredIdNum | idFilter </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">出生日期</span>
                        <span class="text"> myPolicyDetail.custmerInfo.insuredBirthday </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">手机号码</span>
                        <span class="text"> myPolicyDetail.custmerInfo.insuredMobile | phoneFilter </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">电子邮箱</span>
                        <span class="text"> myPolicyDetail.custmerInfo.insuredEmail </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">通讯地址</span>
                        <span class="text"> myPolicyDetail.custmerInfo.insuredHomeAddress </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">通讯邮编</span>
                        <span class="text"> myPolicyDetail.custmerInfo.insuredHomeZipCode </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">单位地址</span>
                        <span class="text"> myPolicyDetail.custmerInfo.insuredComAddress </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">单位电话</span>
                        <span class="text"> myPolicyDetail.custmerInfo.insuredComTel </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">家庭地址</span>
                        <span class="text"> myPolicyDetail.custmerInfo.insuredHomeAddress </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">单位邮编</span>
                        <span class="text"> myPolicyDetail.custmerInfo.insuredComZipCode </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">家庭电话</span>
                        <span class="text"> myPolicyDetail.custmerInfo.insuredHomeTel </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">家庭邮编</span>
                        <span class="text"> myPolicyDetail.custmerInfo.insuredHomeZipCode </span>
                    </div>
                </li>
                <li class="item" >
                    <div class="row">
                        <span class="label blue">险种明细</span>
                    </div>
                    <ion-scroll direction="x" class="policy-table">
                        <table>
                            <tr>
                                <th>被保人</th>
                                <th>险种名称</th>
                                <th>保险金额</th>
                                <th>状态</th>
                                <th>生效日期</th>
                                <th>保险止期</th>
                                <th>下次交费日</th>
                                <th>交费止期</th>
                                <th>交费形式</th>
                                <th>保费</th>
                            </tr>
                            <tr>
                                <td> risk.insuredName </td>
                                <td> risk.addClassName </td>
                                <td> risk.amount </td>
                                <td> risk.addClassStatus </td>
                                <td> risk.effectDate </td>
                                <td> risk.endDate </td>
                                <td> risk.nextChargeDate </td>
                                <td> risk.payEndTime </td>
                                <td> risk.chargeType </td>
                                <td> risk.prem </td>
                            </tr>
                        </table>
                    </ion-scroll>
                </li>
                <li class="item">
                    <div class="row">
                        <span class="label blue">受益人信息</span>
                    </div>
                    <ion-scroll direction="x" class="policy-table">
                        <table>
                            <tr>
                                <th>序号</th>
                                <th>受益人类别</th>
                                <th>受益人姓名</th>
                                <th>受益顺序</th>
                                <th>受益份额</th>
                                <th>授权银行</th>
                                <th>银行账号</th>
                            </tr>
                            <tr>
                                <td> $index+1 </td>
                                <td> bene.bnfType | transferFilter </td>
                                <td> bene.beneficiary </td>
                                <td> bene.bnfNo </td>
                                <td> bene.proportion | percentFilter </td>
                                <td> bene.bankName </td>
                                <td> bene.bankAccNo </td>
                            </tr>
                        </table>
                    </ion-scroll>
                </li>
                <li class="item">
                    <div class="row">
                        <span class="label blue">交费信息</span>
                    </div>
                    <ion-scroll direction="x" class="policy-table">
                        <table>
                            <tr>
                                <th>序号</th>
                                <th>交费日期</th>
                                <th>交费方式</th>
                                <th>交费开户银行</th>
                                <th>交费银行账号</th>
                                <th>交费金额</th>
                                <th>业务类别</th>
                            </tr>
                            <tr>
                                <td> $index+1 </td>
                                <td> payInfo.chargeDate </td>
                                <td> payInfo.chargeType </td>
                                <td> payInfo.bankName </td>
                                <td> payInfo.chargeAccountNo </td>
                                <td> payInfo.chargeAmout </td>
                                <td> payInfo.businessType </td>
                            </tr>
                        </table>
                    </ion-scroll>
                </li>
                <li class="item">
                    <div class="row">
                        <span class="label blue">保险金额领取信息</span>
                    </div>
                    <ion-scroll direction="x" class="policy-table">
                        <table>
                            <tr>
                                <th>序号</th>
                                <th>给付类别</th>
                                <th>给付日期</th>
                                <th>给付对象</th>
                                <th>给付金额</th>
                                <th>是否给付成功</th>
                            </tr>
                            <tr>
                                <td> $index+1 </td>
                                <td> myPolicyDetail.benefitDetailInfo.dutyName </td>
                                <td> myPolicyDetail.benefitDetailInfo.payDate </td>
                                <td> myPolicyDetail.benefitDetailInfo.object </td>
                                <td> myPolicyDetail.benefitDetailInfo.payOut </td>
                                <td> myPolicyDetail.benefitDetailInfo.state </td>
                            </tr>
                        </table>
                    </ion-scroll>
                </li>
                <li class="item">
                    <div class="row">
                        <span class="label blue">单证下载</span>
                    </div>
                    <div class="row">
                        <span class="blue" ng-click="policyDetail.benefitInfoDetail()">电子保单下载</span>
                    </div>
                </li>
            </ul>
        </div>
        <div ng-if="policyDetail.changeState=='1'">
            <ul class="list common-list combine">
                <li class="item">
                    <div class="row">
                        <span class="label blue">万能险账户信息</span>
                    </div>
                    <div class="inf-line">
                        <span class="label">账户结算日</span>
                        <span class="text"> myPolicyDetail.mulRisk.balanceDate </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">结算日账户金额</span>
                        <span class="text"> myPolicyDetail.mulRisk.balanceAmount|currency:'￥' </span>
                    </div>
                </li>
                <li class="item">
                    <div class="row">
                        <span class="label blue">给付信息</span>
                    </div>
                    <ion-scroll direction="x" class="policy-table">
                        <table>
                            <tr>
                                <th>序号</th>
                                <th>给付日期</th>
                                <th>给付方式</th>
                                <th>开户银行</th>
                                <th>银行账号</th>
                                <th>银行户名</th>
                                <th>给付金额</th>
                                <th>业务类别</th>
                            </tr>
                            <tr>
                                <td> $index+1 </td>
                                <td> myPolicyDetail.benefitDetailInfo.payDate </td>
                                <td> myPolicyDetail.benefitDetailInfo.payTpye </td>
                                <td> myPolicyDetail.benefitDetailInfo.bankName </td>
                                <td> myPolicyDetail.benefitDetailInfo.accountNo </td>
                                <td> myPolicyDetail.benefitDetailInfo.accountName </td>
                                <td> myPolicyDetail.benefitDetailInfo.payOut </td>
                                <td> myPolicyDetail.benefitDetailInfo.businessTpye </td>
                            </tr>
                        </table>
                    </ion-scroll>
                </li>
                <li class="item">
                    <div class="row">
                        <span class="label blue">红利账户</span>
                    </div>
                    <ion-scroll direction="x" class="policy-table">
                        <table>
                            <tr>
                                <th>序号</th>
                                <th>红利结算日期</th>
                                <th>红利金额</th>
                                <th>红利领取方式</th>
                            </tr>
                            <tr>
                                <td> $index+1 </td>
                                <td> myPolicyDetail.benefitAccount.balanceDate </td>
                                <td> myPolicyDetail.benefitAccount.bonusAmount </td>
                                <td> myPolicyDetail.benefitAccount.bonusReceiveType|benefitFilter </td>
                            </tr>
                        </table>
                    </ion-scroll>
                </li>
            </ul>
        </div>
        <div ng-if="policyDetail.changeState=='2'">
            <ul class="list common-list combine">
                <li class="item">
                    <div class="row">
                        <span class="label blue">当前服务人员信息</span>
                    </div>
                    <div class="inf-line">
                        <span class="label">工号</span>
                        <span class="text"> myPolicyDetail.policyDetail.agentCode </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">服务专员姓名</span>
                        <span class="text"> myPolicyDetail.policyDetail.agentName </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">性别</span>
                        <span class="text"> myPolicyDetail.policyDetail.agentSex </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">手机</span>
                        <span class="text">--</span>
                    </div>
                    <div class="inf-line">
                        <span class="label">所属区域</span>
                        <span class="text"> myPolicyDetail.policyDetail.managerComName </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">其他联系电话</span>
                        <span class="text">--</span>
                    </div>
                </li>
                <li class="item">
                    <div class="row">
                        <span class="label blue">销售业务员信息</span>
                    </div>
                    <div class="inf-line">
                        <span class="label">工号</span>
                        <span class="text"> myPolicyDetail.business.seilerEmpNo </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">业务员姓名</span>
                        <span class="text"> myPolicyDetail.business.seiletName </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">性别</span>
                        <span class="text"> myPolicyDetail.business.seilerGender </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">手机</span>
                        <span class="text"> myPolicyDetail.business.seilerMobile </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">展业代码</span>
                        <span class="text"> myPolicyDetail.business.qualification </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">所属分支公司</span>
                        <span class="text"> myPolicyDetail.business.brachName </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">其他联系电话</span>
                        <span class="text"> myPolicyDetail.business.seilerOtherTel </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">主管</span>
                        <span class="text">--</span>
                    </div>
                    <div class="inf-line">
                        <span class="label">状态</span>
                        <span class="text"> myPolicyDetail.business.status </span>
                    </div>
                    <div class="inf-line">
                        <span class="label">资格证书</span>
                        <span class="text">--</span>
                    </div>
                </li>
            </ul>
        </div>
    </ion-content>
</ion-view>
